<template>
  <div>
    <HomeHeader />
    <swiper />
    <icon />
    <recommend :list="list" />
  </div>
</template>

<script>
// 导入axios
import axios from "axios";
import HomeHeader from "@/pages/home/components/HomeHeader.vue";
import swiper from "@/pages/home/components/swiper.vue";
import icon from "@/pages/home/components/icon.vue";
import recommend from "@/pages/home/components/Recommend.vue";
export default {
  name: "home",
  components: { HomeHeader, swiper, icon, recommend },
  props: [],
  data() {
    return {
      list:[]
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    this.getlist();
  },
  methods: {
    // 获取数据
    getlist() {
      axios.get("/static/mock/index.json").then((res) => {
        this.list = res.data.data.recommendList
      });
    },
  },
};
</script>

<style lang = "stylus" scoped>

</style>
